<?xml version="1.0" encoding="UTF-8"?>
<as:AppSchemaDataAccess xmlns:as="http://www.geotools.org/app-schema"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.geotools.org/app-schema AppSchemaDataAccess.xsd">
    <namespaces>
        <Namespace>
            <prefix>er</prefix>
            <uri>urn:cgi:xmlns:GGIC:EarthResource:1.1</uri>
        </Namespace>
        <Namespace>
            <prefix>gml</prefix>
            <uri>http://www.opengis.net/gml</uri>
        </Namespace>
        <Namespace>
            <prefix>gsml</prefix>
            <uri>urn:cgi:xmlns:CGI:GeoSciML:2.0</uri>
        </Namespace>
    </namespaces>
    <sourceDataStores>
        <DataStore>
            <id>er_MineralOccurrence</id>
            <parameters>
                <Parameter>
                    <name>directory</name>
                    <value>file:./</value>
                </Parameter>
            </parameters>
        </DataStore>
    </sourceDataStores>
    <targetTypes>
        <FeatureType>
            <schemaUri>http://www.earthresourceml.org/earthresourceml/1.1/xsd/earthResource.xsd</schemaUri>
        </FeatureType>
    </targetTypes>
    <typeMappings>
        <FeatureTypeMapping>
            <sourceDataStore>er_MineralOccurrence</sourceDataStore>
            <sourceType>er_MineralOccurrence</sourceType>
            <targetElement>er:MineralOccurrence</targetElement>
            <attributeMappings>
                <AttributeMapping>
                    <targetAttribute>
						er:MineralOccurrence
					</targetAttribute>					
					<idExpression>
                        <OCQL>ID</OCQL>
                    </idExpression>
                </AttributeMapping>
                <AttributeMapping>
                    <targetAttribute>
						er:planarOrientation
					</targetAttribute>
                    <sourceExpression>
                        <OCQL>SITE_ID</OCQL>
                        <linkElement>gsml:CGI_PlanarOrientation</linkElement>
                        <linkField>FEATURE_LINK</linkField>
                    </sourceExpression>
                    <isMultiple>true</isMultiple>
                </AttributeMapping>
                <AttributeMapping>
                    <targetAttribute>
			            gml:name
  		            </targetAttribute>
                    <sourceExpression>
                        <OCQL>NAME_VALUE</OCQL>
                    </sourceExpression>
                </AttributeMapping>
            </attributeMappings>
        </FeatureTypeMapping>
    </typeMappings>
</as:AppSchemaDataAccess>
